<?php
require_once "include/config.php";
require_once "include/functions.php";
?>

<form method="get" action="index.php">
<select id="select_sidebar" name="subtitle_id" onchange="this.form.submit()">
<option value="">select subtitle to open</option>
<?php
$userid = get_user_info();
//print_r($userid);
$user_id = $userid['id'];
//echo $user_id;
$subtitles = get_user_team_subtitles($user_id);
//print_r($subtitles);
for ($i = 0; $i <= count($subtitles)-1; $i++) {
$video_name = get_video_information($subtitles[$i]['video_id']);
//print_r($video_name);
    echo "<option value='".$subtitles[$i]['id']."'>".$video_name['name']."</option>";
}
?>
</select>
<input type="hidden" name="page" value="subtitle" />
<input type="hidden" name="action" value="open" />
</form>

